package com.dragon.english_practice_back.enums;

public enum TranslateQuestionType {
    Chinese_English_Translation("CET"),
    English_Chinese_Translation("ECT");
    private final String value;
    TranslateQuestionType(String value) {
        this.value = value;
    }
    public String getValue() {
        return value;
    }

    public static TranslateQuestionType getByValue(String value) {
        for (TranslateQuestionType type : TranslateQuestionType.values()) {
            // 忽略大小写比较
            if (type.getValue().equalsIgnoreCase(value)) {
                return type;
            }
        }
        return null;
    }
}
